function expect(result) {
  return {
    toBe: function(actual) {
      if (actual !== result) {
        throw new Error(`预期值与实付值不相等, 预期${actual},实际${result}`)
      }
    }
  }
}

function test(desc, fn) {
  try {
    fn();
    console.log(`${desc} 测试通过`);
  }
  catch(err){
    console.log(`${desc} 测试没有通过 ${err}`);
  }
}

module.exports = {
  expect,
  test
}